


<script setup>
import { ref, reactive } from "vue";

// 遍历一个对象
const myObject = reactive({
    title: 'How to do lists in Vue',
    author: 'Jane Doe',
    publishedAt: '2016-04-10'
})

</script>

<template>
<ul>
    <li v-for="value in myObject" :key="value">
        {{ value }}
    </li>
</ul>

<ul>
    <li v-for="(value, key) in myObject" :key="key">
        {{ key }}: {{ value }}
    </li>
</ul>

<ul>
    <li v-for="(value, key, index) in myObject" :key="index">
        {{ index }}. {{ key }}: {{ value }}
    </li>
</ul>

</template>